package com.example.department.web.controller;

import com.example.department.model.LoginToken;
import com.example.department.web.swagger.LoginControllerSwagger;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.Map;

@RestController
public class LoginController implements LoginControllerSwagger {

    @Override
    @PostMapping("/login1")
    public Map<String, Object> login1(String username, String password) {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", 200);
        map.put("msg", "success");

        return map;
    }

    @Override
    @PostMapping("/login2")
    public Map<String, Object> login2(LoginToken loginToken) {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", 200);
        map.put("msg", "success");

        return map;
    }

    @Override
    @PostMapping("/login3")
    public Map<String, Object> login3(@RequestBody LoginToken loginToken) {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", 200);
        map.put("msg", "success");

        return map;
    }


}
